﻿namespace ZGL.Api.Utils
{
    public class R
    {
        public static int SUCCESSFUL = 200;//成功
        public static int ERROR = 500;//失败

        //public bool Success { get; set; } = true;
        public string? Message { get; set; }
        public int Code { get; set; }
        /// <summary>
        /// ObservableCollection
        /// Dictionary
        /// </summary>
        public object? Data { get; set; }

        public R() { }

        public R(object? data, int code = 200, string? message = "请求成功")
        {
            Code = code;
            Message = message;
            Data = data;
        }
    }
}
